Release 10.1A: OpenEdge Development:
ProDataSets
Comparison with change tracking in .NET
For comparison it is important to note that .NET supports row states and versions similar to these, with certain exceptions. This is the mapping between .NET states and versions and the ProDataSet records and row states:
- Record states in .NET can be
Added,Deleted,Detached,Modified, orUnchanged. These correspond toROW-STATEvalues in Progress except forDetached.Detachedmeans created but not yet in the DataTable. This is a state that can be supported in Progress using transaction semantics. If youCREATEa temp-table record inside a transaction, then until that transaction ends that record isDetached; it has been created but it is not yet “officially” or “definitively” in the table. It can be backed out if the transaction fails or is otherwise undone.- Records in
DataTablesin .NET also have a version, which is a qualifier on the record object (like an attribute reference). This can beCurrent,Default,Original, orProposed.- The
Currentversion is like a record in the ProDataSet after-table. We have specifically decided to use the term (and keyword element)AFTERbecauseCURRENTalready has a very specific, and very different, meaning in Progress, namely in functions and statements such asGET CURRENT,FINDCURRENT, and so on, that normally refer to a database record buffer.- The
Originalversion is like a record in the ProDataSet before-table. Once again, we have decided to use the term and keywordBEFORErather than “original” because in Progress we create and maintain a separate, additional table for the before images of records. It is logical to think of this table as being created as a by-product of the actual temp-table containing the data as it is retrieved and viewed. Therefore, anyone referring to these objects is likely to think of what Microsoft calls the “current” records as the “original” table, not the other way around. Also, the word “before” complements “after,” so if one term is going to be different from .NET both might as well be, and also it matches our use of the well-established term “before-image,” which is precisely what the “before” table contains.- The
Defaultversion is defined to be theCurrentversion for anAddedorModifiedrecord, or theOriginalversion for aDeletedrecord. This rather specialized identifier is not duplicated in Progress and provides no information that can’t be obtained otherwise.- The
Proposedversion is one that exists but has not yet been committed to theDataTable. This state is possible inside aBEGIN-EDIT/END-EDITblock, which is essentially like a transaction block in Progress. Like theDetachedstate, this can be represented using transaction semantics in Progress, as a record still within an unfinished transaction.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |